﻿
@{
    ViewBag.Title = "优惠活动";
    Layout = "~/Views/Shared/_layoutPersonal.cshtml";
}
@Styles.Render("~/Content/css/promotion")
<nav class="mod_nav">
    <div class="lay_left">
        <a class="nav_back" onclick="turnBack()"><img src="/images/return_1.png" ontouchstart="replaceBackImage(this, 1)" ontouchend="replaceBackImage(this, 2)"></a>
        <span id="promotionTitleHelp"></span>
    </div>
</nav>
<div class="promotionIframeWindow">
    <iframe frameborder=0 marginheight=0 marginwidth=0 scrolling=auto src=""></iframe>  
</div>
<script>
    window.onload = function () {
        var promotionGoodsInfo = PromotionMgr.getPromotionGoodsInfo();
        $("#promotionTitleHelp").text(promotionGoodsInfo.goods_info.name);
        setIframeHeight();
        $("iframe").attr("src",  promotionGoodsInfo.goods_info.webview_url);
    }

    function turnBack() {
        window.location.href = '/Home/Index';
    }

    function setIframeHeight() {
        var currentWindowHeight = $(window).height() - 48;
        var currentWindowWidth = $(window).width();
        //当前容器确定高度
        $("iframe").attr("height", currentWindowHeight);
        $("iframe").attr("width", currentWindowWidth);        
    }
</script>

